package com.itheima.controller;

import com.itheima.pojo.Result;
import com.itheima.service.SetMealService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/setmeal")
public class SetMealMobileController {
    @Reference
    private SetMealService setMealService;

    /**
     *查询所有的套餐信息
     * @return
     */
    @RequestMapping("/findAllSetmeal.do")
    public Result findAllSetMeal(){
        return setMealService.findAllSetMeal();
    }

    /**
     * 根据id查询详情
     * @param id
     * @return
     */
    @RequestMapping("/findSetMealDetail.do")
    public Result findSetMealDetail(@RequestParam("id") String id){
        return setMealService.findSetMealDetail(id);
    }
}
